﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Samurai.Infrastructure;

namespace Samurai.MovieIndustry
{
    public class MockMovieService : IMovieService
    {
        public Movie GetInfo(string query)
        {
            Random random = new Random(DateTime.Now.Millisecond);

            var aRandomNumber = random.Next();

            var title = query;
            var rating = random.Next(0,10).ToString();
            var year = random.Next(1900, 2011).ToString();
            string error = null;
            string genres = null;
            var url = "http://www.google.com";


            return new Movie()
            {
                Title = title,
                Rating = rating,
                Year = year,
                Error = error,
                Genres = genres == null ? null : genres.Split(','),
                Url = url
            };
        }
    }
}
